import Vue from 'vue'
import router from './router'
import App from './App.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import store from './store'

Vue.config.productionTip = false

Vue.use(ElementUI);

router.beforeEach((to, form, next) => {
  /* 路由改变修改页面的title */
  console.log(to)
  console.log(form)
  if (to.meta.title) {
      document.title = to.meta.title
  }    
  next()
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
